<template>
    <div class="app">
        <ConfigProvider :locale="zhCN">
            <router-view />
        </ConfigProvider>
    </div>
</template>


<script>
import zhCN from 'ant-design-vue/es/locale/zh_CN';
import 'dayjs/locale/zh-cn'
import { ConfigProvider } from 'ant-design-vue'
import dayjs from 'dayjs'
window.dayjs = dayjs
export default {
    components: {
        ConfigProvider
    },
    data() {
        return {
            zhCN,

        }
    },
    mounted() {
        this.checkIsFull()
        window.addEventListener("resize", this.checkIsFull);
    },
    methods: {
        checkIsFull() {
            if (document.fullscreenElement || document.webkitFullscreenElement || document.mozFullscreenElement || document.msFullscreenElement) {
                console.log('全屏模式');
                this.$store.commit('control/SET_FULL_SCREEN_STATUS', true)
            } else {
                this.$store.commit('control/SET_FULL_SCREEN_STATUS', false)
                console.log('非全屏模式');
            }
        }
    }
}

</script>

<style src="@/styles/index.less" lang="less"></style>

<style lang="less" scoped>
.app{
    width: 100%;
    height: 100%;
}
</style>

